﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class Admin_Contact : System.Web.UI.Page
{
    ContactController contactController = new ContactController();
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            grvContact.DataSource = contactController.GetAll();
            grvContact.DataBind();
            if (grvContact.Rows.Count > 0)
            {
                grvContact.UseAccessibleHeader = true;
                grvContact.HeaderRow.TableSection = TableRowSection.TableHeader;
            } 
        }
    }
}